//
//  SkillRes.h
//  CandyJump
//
//  Created by Bon Lam on 03/07/2011.
//  Copyright 2011 Peru Republic. All rights reserved.
//

/**
 Resources for skill.
 Remark: Please load the CharBuffRes data BEFORE loading skill and item data.
 */
@class Skill;
//=====================================================================================================================
@interface SkillRes : NSObject<NSXMLParserDelegate>
{
	NSMutableDictionary *skillListDictionary;
	
	Skill			*currentReadingSkill;
}
//---------------------------------------------------------------------------------------------------------------------
@property(nonatomic, readonly, retain)NSMutableDictionary *skillListDictionary;

//---------------------------------------------------------------------------------------------------------------------
#pragma mark SkillRes - Singleton
- (id)init;
- (void)dealloc;
+ (id)allocWithZone:(NSZone *)zone;
- (id)copyWithZone:(NSZone *)zone;
- (id)retain;
- (NSUInteger)retainCount;
- (void)release;
- (id)autorelease;
+ (SkillRes *)sharedRes;

#pragma mark SkillRes - Load Data
- (void)loadSkills;

#pragma mark SkillRes - NSXMLParserDelegate
- (BOOL)parseXMLFile:(NSString *)filename;
- (void)parseXMLData:(NSData *)data parseError:(NSError **)error;
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict;
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName;
- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError;
- (void)parserDidEndDocument:(NSXMLParser *)parser;

@end
